<?php

namespace frontendm\controllers;

/**
 * @author  shuang
 * @date    2016-11-3 11:50:43
 * @version V1.0
 * @desc    
 */
use common\components\WXController;
use Yii;
use yii\helpers\Json;

class AccountController extends WXController {

    public function actionPayinfo() {
        return $this->render("payinfo");
    }

    public function actionTixian() {
        $useraccount = \frontendm\models\WB_UserAccountHy::find()->where("userid=:userid", [":userid" => Yii::$app->user->id])->one();
//        $event = new \common\components\AccountEvent(["useraccount"=>$useraccount]);
//        $this->on("drawalevent", [$event, "drawalTask"]);
//        $this->trigger("drawalevent", $event);
//        $this->off("drawalevent");
        if (Yii::$app->request->isAjax) {
            $temp = [
                "ok" => true, "data" => ["hasNextPage" => false, "list" => [], "page" => 1]
            ];
            echo Json::encode($temp);
            exit;
        } else {
            return $this->render("tixian", ["useraccount" => $useraccount]);
        }
    }

}
